<%@ page language="java" import="java.util.*, com.rmt.www.vo.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>Reports for <s:property value='project.getTitle()'/></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script src="js/jquery-1.7.1.js"></script>
        <script src="js/jquery-ui-1.8.18.custom.min.js"></script>
        <link href="css/jquery-ui-1.8.18.custom.css" rel="stylesheet"
            type="text/css" />
            <link href="css/Site.css" rel="stylesheet" type="text/css" />
        <script>
        	var index=<s:property value='index' />;
        	if(index==-1)
        		index++;
            $(function() {
                var  $tabs=$('#tabs').tabs({
                    select: function(event, ui) {
                        $('input:checked').each(function(){
                            $(this).attr('checked',false);
                        });
                        index=$("#tabs").tabs("option","selected");
                        index++;                     
                    },
                 }
                );
            });
            
            function printdiv(printpage)
			{
				var headstr = "<html><head><title></title></head><body>";
				var footstr = "</body>";
				var newstr = document.all.item(printpage).innerHTML;
				var oldstr = document.body.innerHTML;
				//将需要的内容组装成新的html页面并进行打印
				document.body.innerHTML = headstr+newstr+footstr;
				window.print();
				document.body.innerHTML = oldstr;
				
				var pid = '<s:property value="project.pid"/>';
				var url = "report?pid=" + pid+"&index="+index;
				//window.open(url, "_self");
				return false;
			}
        </script>
  </head>
  
  <body>
  <div class='page' style='background-color: #5c87b2' id='wrap'>
    <div id="header">
            <div id="title" >
                <h1>&nbsp;&nbsp;RMT Service for administrator</h1>
            </div>
              
            
                <div id="logindisplay">
                welcome <%=((User)session.getAttribute("currentUser")).getName()%>,  <a href='../RMT'>logout</a>
             
            </div>
    <br/>
            <div id="menucontainer">
            
                <ul id="menu">
                	<li><a href="adminHomeAction">Home</a></li>              
                    <li><a href='getProjectsForAdmin'>Projects</a></li>
                    <li><a href='accountManageAction?manageTarget=account'>Users</a></li>
                </ul>
            
            </div>
        </div>
   

    <div id="tabs">
        <ul>
                <li>
                    <a href="#feature"><span>feature</span> </a>
                </li>
                <li>
                    <a href="#requirement"><span>requirement</span> </a>
                </li>
                <li>
                    <a href="#design"><span>design</span> </a>
                </li>
                <li>
                    <a href="#implementation"><span>implementation</span> </a>
                </li>
                <li>
                    <a href="#testCase"><span>test case</span> </a>
                </li>
        </ul>
        
        
         
        <div id='feature'>
         <button onclick="printdiv('featurespec')">print</button>
       	<div id='featurespec'>
       		<h1 style="text-align:center">FEATURES of <s:property value='project.title'/></h1>
		    <table align='center' style='width: 400'>
		        <tr>
		            <td><b>project owner:</b></td>
		            <td><s:property value='project._ownername'/></td>
		        </tr>
		        <tr>
		            <td><b>created time:</b></td>
		            <td><s:property value='project.time'/></td>
		        </tr>
		        <tr>
		            <td>simple description:</td>
		            <td><u><s:property value='project.description'/></u></td>
		        </tr>
             </table>
        <hr/>
        <s:iterator value="featureList" id="list" status="st">
            <table border='1' style='width: 700' align='center' cellspacing="0px" style="border-collapse:collapse">
                <tr>
                    <td width='200'>feature id</td>
                    <td>F-<s:property value='#list.id'/></td>
                </tr>
               <tr>
		    		<td>
		    			title
		    		</td>
		    		<td>
		    			<s:property value='#list.title'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			author
		    		</td>
		    		<td>
		    			<s:property value='#list._authorname'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			version
		    		</td>
		    		<td>
		    			<s:property value='#list.version'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			priority
		    		</td>
		    		<td>
		    			<s:property value='#list.priority'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			source
		    		</td>
		    		<td>
		    			<s:property value='#list.source'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			rational
		    		</td>
		    		<td>
		    			<s:property value='#list.rational'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			created time
		    		</td>
		    		<td>
		    			<s:property value='#list.createdtime'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			latest updated time
		    		</td>
		    		<td>
		    			<s:property value='#list.updatedtime'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			latest updated user
		    		</td>
		    		<td>
		    			<s:property value='#list._updatername'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			status
		    		</td>
		    		<td>
		    			<s:property value='#list.status'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			description
		    		</td>
		    		<td>
		    			<s:property value='#list.description'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			effort
		    		</td>
		    		<td>
		    			<s:property value='#list.effort'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			risk
		    		</td>
		    		<td>
		    			<s:property value='#list.risk'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			cost
		    		</td>
		    		<td>
		    			<s:property value='#list.cost'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			updated times
		    		</td>
		    		<td>
		    			<s:property value='#list.updatedtimes'/>
		    		</td>
		    	</tr>
            </table>
            <hr/>
        </s:iterator>
       	</div>
        </div>
        <div id='requirement'>
         <button onclick="printdiv('requirementspec')">print</button>
       	<div id='requirementspec'>
       		<h1 style="text-align:center">REQUIREMENTs of <s:property value='project.title'/></h1>
            <table align='center' style='width: 400'>
                <tr>
                    <td>project owner:</td>
                    <td><u><s:property value='project._ownername'/></u></td>
                </tr>
                <tr>
                    <td>created time:</td>
                    <td><u><s:property value='project.time'/></u></td>
                </tr>
                <tr>
                    <td>simple description:</td>
                    <td><u><s:property value='project.description'/></u></td>
                </tr>
             </table>
        <hr/>
            <s:iterator value="requirementList" id="list" status="st">
                <table  border='1' style='width: 700' align='center' cellspacing="0px" style="border-collapse:collapse">
                   <tr>
                    <td width='200'>requirement id</td>
                    <td>R-<s:property value='#list.id'/></td>
                </tr>
                <tr>
		    		<td>
		    			title
		    		</td>
		    		<td>
		    			<s:property value='#list.title'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			author
		    		</td>
		    		<td>
		    			<s:property value='#list._authorname'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			version
		    		</td>
		    		<td>
		    			<s:property value='#list.version'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			requirement type
		    		</td>
		    		<td>
		    			<s:property value='#list.requirementtype'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			priority
		    		</td>
		    		<td>
		    			<s:property value='#list.priority'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			source
		    		</td>
		    		<td>
		    			<s:property value='#list.source'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			rational
		    		</td>
		    		<td>
		    			<s:property value='#list.rational'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			created time
		    		</td>
		    		<td>
		    			<s:property value='#list.createdtime'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			latest updated time
		    		</td>
		    		<td>
		    			<s:property value='#list.updatedtime'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			latest updated user
		    		</td>
		    		<td>
		    			<s:property value='#list._updatername'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			status
		    		</td>
		    		<td>
		    			<s:property value='#list.status'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			description
		    		</td>
		    		<td>
		    			<s:property value='#list.description'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			effort
		    		</td>
		    		<td>
		    			<s:property value='#list.effort'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			risk
		    		</td>
		    		<td>
		    			<s:property value='#list.risk'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			cost
		    		</td>
		    		<td>
		    			<s:property value='requirementArtifact.cost'/>
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>
		    			updated times
		    		</td>
		    		<td>
		    			<s:property value='#list.updatedtimes'/>
		    		</td>
		    	</tr>
                </table>
                 <hr/>
            </s:iterator>
       	</div>
        </div>
        <div id='design'>
         <button onclick="printdiv('designspec')">print</button>
       	<div id='designspec'>
       		<h1 style="text-align:center">DESIGNs of <s:property value='project.title'/></h1>
            <table align='center' style='width: 400'>
                <tr>
                    <td>project owner:</td>
                    <td><u><s:property value='project._ownername'/></u></td>
                </tr>
                <tr>
                    <td>created time:</td>
                    <td><u><s:property value='project.time'/></u></td>
                </tr>
                <tr>
                    <td>simple description:</td>
                    <td><u><s:property value='project.description'/></u></td>
                </tr></table>
			<hr/>
		<s:iterator value="designList" id="list" status="st">
                <table border='1' style='width: 700' align='center' cellspacing="0px" style="border-collapse:collapse">
                    <tr>
                    <td width='200'>design id</td>
                    <td>D-<s:property value='#list.id'/></td>
	                </tr>
	                <tr>
			    		<td>
			    			title
			    		</td>
			    		<td>
			    			<s:property value='#list.title'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			author
			    		</td>
			    		<td>
			    			<s:property value='designArtifact._authorname'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			version
			    		</td>
			    		<td>
			    			<s:property value='#list.version'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			priority
			    		</td>
			    		<td>
			    			<s:property value='#list.priority'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			effort
			    		</td>
			    		<td>
			    			<s:property value='#list.effort'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			cost
			    		</td>
			    		<td>
			    			<s:property value='#list.cost'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			risk
			    		</td>
			    		<td>
			    			<s:property value='#list.risk'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			latest updater
			    		</td>
			    		<td>
			    			<s:property value='#list._updatername'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			status
			    		</td>
			    		<td>
			    			<s:property value='#list.status'/>
			    		</td>
			    	</tr>
			    	
			    	<tr>
			    		<td>
			    			architect
			    		</td>
			    		<td>
			    			<s:property value='#list.architect'/>
			    		</td>
			    	</tr>
			    	
			    	<tr>
			    		<td>
			    			consideration
			    		</td>
			    		<td>
			    			<s:property value='#list.consideration'/>
			    		</td>
			    	</tr>
			    	
			    	<tr>
			    		<td>
			    			input
			    		</td>
			    		<td>
			    			<s:property value='#list.input'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			function
			    		</td>
			    		<td>
			    			<s:property value='#list.function'/>
			    		</td>
			    	</tr>
			    	
			    	<tr>
			    		<td>
			    			output
			    		</td>
			    		<td>
			    			<s:property value='#list.output'/>
			    		</td>
			    	</tr>
			    	
			    	<tr>
			    		<td>
			    			performance request
			    		</td>
			    		<td>
			    			<s:property value='#list.perfrequest'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			security request
			    		</td>
			    		<td>
			    			<s:property value='#list.securityrequest'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			storage request
			    		</td>
			    		<td>
			    			<s:property value='#list.storagerequest'/>
			    		</td>
			    	</tr>
			    	
			    	<tr>
			    		<td>
			    			inner interface
			    		</td>
			    		<td>
			    			<s:property value='#list.innerinterface'/>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>
			    			outer interface
			    		</td>
			    		<td>
			    			<s:property value='#list.outerinterface'/>
			    		</td>
			    	</tr>
            	</table>
                 <hr/>
            </s:iterator>
       	</div>
        </div>
        <div id='implementation'>
         <button onclick="printdiv('implspec')">print</button>
      	<div id='implspec'>
      		 <h1 style="text-align:center">IMPLEMENTATIONs of <s:property value='project.title'/></h1>
            <table align='center' style='width: 400'>
                <tr>
                    <td>project owner:</td>
                    <td><u><s:property value='project._ownername'/></u></td>
                </tr>
                <tr>
                    <td>created time:</td>
                    <td><u><s:property value='project.time'/></u></td>
                </tr>
                <tr>
                    <td>simple description:</td>
                    <td><u><s:property value='project.description'/></u></td>
                </tr>
             </table>
        <hr/>
            <s:iterator value="implementationList" id="list" status="st">
                <table border='1' style='width: 700' align='center' cellspacing="0px" style="border-collapse:collapse">
                    <tr>
                    <td width='200'>implementation id</td>
                    <td>I-<s:property value='#list.id'/></td>
	                </tr>
	                <tr>
			    		<td>
			    			title
			    		</td>
			    		<td>
			    			<s:property value='#list.title'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			author
			    		</td>
			    		<td>
			    			<s:property value='#list._authorname'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			function
			    		</td>
			    		<td>
			    			<s:property value='#list.function'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			input
			    		</td>
			    		<td>
			    			<s:property value='#list.input'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			processing steps
			    		</td>
			    		<td>
			    			<s:property value='#list.processingsteps'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			algorithm
			    		</td>
			    		<td>
			    			<s:property value='#list.algorithm'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			error handling
			    		</td>
			    		<td>
			    			<s:property value='#list.errorhandling'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			language
			    		</td>
			    		<td>
			    			<s:property value='#list.language'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			code
			    		</td>
			    		<td>
			    			<s:property value='#list.code'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			priority
			    		</td>
			    		<td>
			    			<s:property value='#list.priority'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			effort
			    		</td>
			    		<td>
			    			<s:property value='#list.effort'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			cost
			    		</td>
			    		<td>
			    			<s:property value='#list.cost'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			risk
			    		</td>
			    		<td>
			    			<s:property value='#list.risk'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			comment
			    		</td>
			    		<td>
			    			<s:property value='#list.comment'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			latest updater
			    		</td>
			    		<td>
			    			<s:property value='#list._updatername'/>
			    		</td>
		    		</tr>
		    		
		    	    <tr>
			    		<td>
			    			version
			    		</td>
			    		<td>
			    			<s:property value='#list.version'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			status
			    		</td>
			    		<td>
			    			<s:property value='#list.status'/>
			    		</td>
		    		</tr>	
                </table>
                 <hr/>
            </s:iterator>
      	</div>
        </div>
        <div id='testcase'>
         <button onclick="printdiv('testcasespec')">print</button>
         <div id='testcasespec'>
       <h1 style="text-align:center">TEST CASEs of <s:property value='project.title'/></h1>
            <table align='center' style='width: 400'>
                <tr>
                    <td>project owner:</td>
                    <td><u><s:property value='project._ownername'/></u></td>
                </tr>
                <tr>
                    <td>created time:</td>
                    <td><u><s:property value='project.time'/></u></td>
                </tr>
                <tr>
                    <td>simple description:</td>
                    <td><u><s:property value='project.description'/></u></td>
                </tr>
             </table>
        <hr/>
            <s:iterator value="testcaseList" id="list" status="st">
                <table border='1' style='width: 700' align='center' cellspacing="0px" style="border-collapse:collapse">
                    <tr>
                        <td width='200'>test case id</td>
                        <td>TC-<s:property value='#list.id'/></td>
	                </tr>
	               <tr>
			    		<td>
			    			title
			    		</td>
			    		<td>
			    			<s:property value='#list.title'/>
			    		</td>
		    		</tr>	
		    		
		    		<tr>
			    		<td>
			    			author
			    		</td>
			    		<td>
			    			<s:property value='#list._authorname'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			test case type
			    		</td>
			    		<td>
			    			<s:property value='#list.testcasetype'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			priority	
			    		</td>
			    		<td>
			    			<s:property value='#list.priority'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			precondition		
			    		</td>
			    		<td>
			    			<s:property value='#list.precondition'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			input	
			    		</td>
			    		<td>
			    			<s:property value='#list.input'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			test data
			    		</td>
			    		<td>
			    			<s:property value='#list.testdata'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			steps
			    		</td>
			    		<td>
			    			<s:property value='#list.steps'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			expected result
			    		</td>
			    		<td>
			    			<s:property value='#list.expectedresult'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			post condition	
			    		</td>
			    		<td>
			    			<s:property value='#list.effort'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			cost	
			    		</td>
			    		<td>
			    			<s:property value='#list.cost'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			risk
			    		</td>
			    		<td>
			    			<s:property value='#list.risk'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			comment
			    		</td>
			    		<td>
			    			<s:property value='#list.comment'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			latest updater
			    		</td>
			    		<td>
			    			<s:property value='#list._updatername'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			version
			    		</td>
			    		<td>
			    			<s:property value='#list.version'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			status
			    		</td>
			    		<td>
			    			<s:property value='#list.status'/>
			    		</td>
		    		</tr>
		    		
		    		<tr>
			    		<td>
			    			updated times
			    		</td>
			    		<td>
			    			<s:property value='#list.updatedtimes'/>
			    		</td>
		    		</tr>
                </table>
                 <hr/>
            </s:iterator>
            </div>
        </div>
    </div>
    <div class="push"></div>
  	<div id="footer" style="background-color:#5c87b2;">
  	  <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:hidden;background-color:#5c87b2;">							
		<tbody style="border:hidden">
			<tr style="border: hidden">	
				<td width="160" style="border: hidden">&nbsp;</td>											   		<td>									
				<table width="60%" border="0" cellspacing="0" cellpadding="0" style="border:hidden;">	
					<tbody style="border: hidden">
						<tr style="border: hidden">
							<td height="20px"><font color='#ffffff'>©2012 Copyright NJU SEI RMT team</font></td>										
						</tr>										
						<tr style="border: hidden">											
							<td height="20px"><font color='#ffffff'>2012 graduation project: requirement management tool</font></td>	
						</tr>										
						<tr style="border: hidden">					
							<td height="20px"><font color='#ffffff'>project homepage：http://code.google.com/p/rmt-ss/</font></td>		
						</tr>									
					</tbody>
				</table>								
				</td>							
			</tr>						
		</tbody>
	</table>	
  	</div>
    </div>
  </body>
</html>
